package com.xsky.common.util;

import java.io.File;

public class FileHandle
{
	public void deleteFile(File oldPath) 
	{
	  if (oldPath.isDirectory()) 
	  {
		   File[] files = oldPath.listFiles();
		   if (files != null) 
		   {
			    for (File file : files) 
			    {
				     if (file.isFile()) 
				     {
				      file.delete();
				     } 
				     else 
				     {
				      deleteFile(file);
				      file.delete();
				     }
			    }
		   }
	  }
	  oldPath.delete();
	} 

}
